<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/pages/comm/comm.jsp" %>

<!DOCTYPE html>
<!--[if IE 8]> <html lang="zh-CN" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="zh-CN" class="ie9"> <![endif]-->
<!--[if !IE]><!-->
<html lang="zh-CN">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="utf-8" />
<title></title>
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<meta content="" name="description" />
<meta content="" name="author" />
<!-- BEGIN GLOBAL MANDATORY STYLES -->
<link href="${ctx }/static/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="${ctx }/static/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css" />
<%-- <link href="${ctx }/static/css/font-awesome.min.css" rel="stylesheet" type="text/css" /> --%>
<link href="${ctx }/static/css/style-metro.css" rel="stylesheet" type="text/css" />
<link href="${ctx }/static/css/style.css" rel="stylesheet" type="text/css" />
<link href="${ctx }/static/css/style-responsive.css" rel="stylesheet" type="text/css" />
<link href="${ctx }/static/css/default.css" rel="stylesheet" type="text/css" id="style_color" />
<link href="${ctx }/static/css/uniform.default.css" rel="stylesheet" type="text/css" />
<link href="${ctx }/static/css/pages.css" rel="stylesheet" type="text/css" />
<link href="${ctx }/static/css/DT_bootstrap.css" rel="stylesheet" type="text/css" />
<link href="${ctx }/static/css/select2_metro.css" rel="stylesheet" type="text/css" />
<!-- END GLOBAL MANDATORY STYLES -->
<!-- BEGIN PAGE LEVEL STYLES -->
<link href="${ctx }/static/css/bootstrap-tag.css" rel="stylesheet" type="text/css" />
<link href="${ctx }/static/css/bootstrap-wysihtml5.css" rel="stylesheet" type="text/css" />
<link href="${ctx }/static/css/jquery.fancybox.css" rel="stylesheet" />
<!-- BEGIN:File Upload Plugin CSS files-->
<link href="${ctx }/static/css/jquery.fileupload-ui.css" rel="stylesheet" type="text/css">
<link href="${ctx }/static/css/news.css" rel="stylesheet" type="text/css">
<link href="${ctx }/static/js/layer/skin/layer.css" rel="stylesheet" type="text/css">
<!-- END:File Upload Plugin CSS files-->
<!-- END PAGE LEVEL STYLES -->
<link rel="shortcut icon" href="" />
<style>
a{color: #bdbdbd;}
a:hover, a:focus{color: #fff;}
.current{background-color:#575757; color:#fff;}
</style>
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed">
	<!-- BEGIN HEADER -->
	<div class="header navbar navbar-inverse navbar-fixed-top">
		<!-- BEGIN TOP NAVIGATION BAR -->
		<div class="navbar-inner">
			<div class="container-fluid">
				<!-- BEGIN LOGO -->
				<a class="brand" href="${ctx }"><img	src="${ctx }/static/image/logo.png" alt="logo" width="25" /><span style="color:#fff; padding-left:10px">党建微课</span> </a>
				<!-- END LOGO -->
				<!-- BEGIN RESPONSIVE MENU TOGGLER -->
				<a href="javascript:;" class="btn-navbar collapsed"	data-toggle="collapse" data-target=".nav-collapse"> 
				<img src="${ctx }/static/image/menu-toggler.png" alt="" /> </a>
				<!-- END RESPONSIVE MENU TOGGLER -->
				<!-- BEGIN TOP NAVIGATION MENU -->
				<ul class="nav pull-right">
					<!-- BEGIN USER LOGIN DROPDOWN -->
					<li class="dropdown user">
						<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown"> 
							<c:choose>
								<c:when test="${!empty userInfo.headUrl }">
									<img alt="" id="userHeadUrl" width="33px" height="33px"
										src="${userInfo.headUrl}" />
								</c:when>
								<c:otherwise>
									<img alt="" id="userHeadUrl" width="33"; max-height="33"
										src="${ctx }/static/image/avatar1_small.jpg" />
								</c:otherwise>
							</c:choose> <!-- 							<img alt=""	src="${ctx }/static/image/avatar1_small.jpg" />  -->
							<span class="username">${empty userInfo.userName?userInfo.accountNo:userInfo.userName }，欢迎你！</span>
							<i class="icon-angle-down"></i> 
						</a>
						<ul class="dropdown-menu">
							<!--  <li><a href="extra_lock.html"><i class="icon-lock"></i>锁屏</a></li> -->
							<li><a href="javascript:void(0);"  onclick="loginOut()"><i class="icon-key"></i>退出</a></li>
						</ul>
					</li>
					<!-- END USER LOGIN DROPDOWN -->
				</ul>
				<!-- END TOP NAVIGATION MENU -->
			</div>
		</div>
		<!-- END TOP NAVIGATION BAR -->
	</div>
	<!-- END HEADER -->
	<!-- BEGIN CONTAINER -->
	<div class="page-container row-fluid">
		<!-- BEGIN SIDEBAR -->
		<div class="page-sidebar nav-collapse collapse">
			<!-- BEGIN SIDEBAR MENU -->
			<ul class="page-sidebar-menu">
				<li>
					<!-- BEGIN SIDEBAR TOGGLER BUTTON -->
					<div class="sidebar-toggler hidden-phone"></div> <!-- BEGIN SIDEBAR TOGGLER BUTTON -->
				</li>
				<li>
					<!-- BEGIN RESPONSIVE QUICK SEARCH FORM -->
                   
					<form class="sidebar-search">
					    <!-- 
						<div class="input-box">
							<a href="javascript:;" class="remove"></a> 
							<input type="text" placeholder="Search..." />
							<input type="button" class="submit" value=" "/>
						</div>
						 -->
					</form> 
					
					<!-- END RESPONSIVE QUICK SEARCH FORM --></li>
				<!-- <li class="start">
					<a href="news.html">
						<i class="icon-home"></i>
						<span class="title">欢迎页</span>
					</a>
				</li> -->
				
			<c:forEach items="${list }" var="item">
				<c:if test="${empty item.parentId }">
					<li class="" <c:if test="${empty item.menus }">onclick="initContentDiv('${item.menuId }',event,'${item.menuUrl }')"</c:if>>
						<a href="javascript:;"> 
							<i class="${item.menuIco} icon-white"></i>
							<span class="title">${item.menuName }</span> 
							<span class="selected"></span> 
							<span class="arrow open"></span> 
						</a>
						<ul class="sub-menu">
							<c:forEach items="${list }" var="children">
								<c:if test="${children.parentId eq item.menuId }">
									<li><a href="javascript:;" onclick="initContentDiv('${children.menuId }',event,'${children.menuUrl }')">${children.menuName }</a></li>
								</c:if>
							</c:forEach>
						</ul>
					</li>
				</c:if>
			</c:forEach>
			</ul>
			<!-- END SIDEBAR MENU -->
		</div>
		<!-- END SIDEBAR -->
		<!-- BEGIN PAGE -->
		<div class="page-content">
			<div class="index-container"> 
				<div class="container-fluid">
					<!-- BEGIN PAGE HEADER-->
					<div class="row-fluid">
						<div class="span12"> 
							<div class="">
								<div class="span4 offset4 index-box">
									<h2>欢迎登陆</h2>
									<h4>党建微课后台管理系统</h4>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- END CONTAINER -->
	<!-- BEGIN FOOTER -->
	<div class="footer">
		<div class="footer-inner">2015 &copy;省委组织部</div>
		<div class="footer-tools" id="scroll">
			<span class="go-top"> <i class="icon-angle-up"></i> </span>
		</div>
	</div>
	<!-- END FOOTER -->
	<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
	<!-- BEGIN CORE PLUGINS -->

	<%-- <script src="${ctx }/static/js/jquery.js" type="text/javascript"></script> --%>
	<script src="${ctx }/static/js/jquery-1.10.1.min.js" type="text/javascript"></script>
	<script src="${ctx }/static/js/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
	<!-- IMPORTANT! Load jquery-ui-1.10.1.custom.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->
	<%-- <script src="${ctx }/static/js/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script> --%>
	<script src="${ctx }/static/js/bootstrap.min.js" type="text/javascript"></script>
	<!--[if lt IE 9]>
	<script src="${ctx }/static/js/excanvas.min.js"></script>
	<script src="${ctx }/static/js/respond.min.js"></script>  
	<![endif]-->
	<script src="${ctx }/static/js/breakpoints.min.js" type="text/javascript"></script>
	<script src="${ctx }/static/js/jquery.slimscroll.min.js" type="text/javascript"></script>
	<script src="${ctx }/static/js/jquery.blockui.min.js" type="text/javascript"></script>
	<script src="${ctx }/static/js/jquery.cookie.min.js" type="text/javascript"></script>
	<script src="${ctx }/static/js/jquery.uniform.min.js" type="text/javascript"></script>
	<!-- END CORE PLUGINS -->
	<!-- BEGIN PAGE LEVEL PLUGINS -->
	<script src="${ctx }/static/js/bootstrap-tag.js" type="text/javascript"></script>
	<script src="${ctx }/static/js/jquery.fancybox.pack.js" type="text/javascript"></script>
	<script src="${ctx }/static/js/wysihtml5-0.3.0.js" type="text/javascript"></script>
	<script src="${ctx }/static/js/bootstrap-wysihtml5.js" type="text/javascript"></script>
	<!-- BEGIN:File Upload Plugin JS files-->
	<script src="${ctx }/static/js/jquery.ui.widget.js"></script>
	<!-- The Templates plugin is included to render the upload/download listings -->
	<script src="${ctx }/static/js/tmpl.min.js"></script>
	<!-- The Load Image plugin is included for the preview images and image resizing functionality -->
	<script src="${ctx }/static/js/load-image.min.js"></script>
	<!-- The Canvas to Blob plugin is included for image resizing functionality -->
	<script src="${ctx }/static/js/canvas-to-blob.min.js"></script>
	<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
	<script src="${ctx }/static/js/jquery.iframe-transport.js"></script>
	<!-- The basic File Upload plugin -->
	<script src="${ctx }/static/js/jquery.fileupload.js"></script>
	<!-- The File Upload file processing plugin -->
	<script src="${ctx }/static/js/jquery.fileupload-fp.js"></script>
	<!-- The File Upload user interface plugin -->
	<script src="${ctx }/static/js/jquery.fileupload-ui.js"></script>
	<!-- The XDomainRequest Transport is included for cross-domain file deletion for IE8+ -->
	<!--[if gte IE 8]><script src="${ctx }/static/js/jquery.xdr-transport.js"></script><![endif]-->
	<!-- END:File Upload Plugin JS files-->
	<!-- END PAGE LEVEL PLUGINS -->
	<%-- <script src="${ctx }/static/js/app.js"></script>
	<script src="${ctx }/static/js/inbox.js"></script>
	<script>
		jQuery(document).ready(function() {       
		   // initiate layout and plugins
		   App.init();
		   Inbox.init();
		});
	</script> --%>
	<!-- END JAVASCRIPTS -->
	<script type="text/javascript">  var _gaq = _gaq || [];  _gaq.push(['_setAccount', 'UA-37564768-1']);  _gaq.push(['_setDomainName', 'keenthemes.com']);  _gaq.push(['_setAllowLinker', true]);  _gaq.push(['_trackPageview']);  (function() {    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;    ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);  })();</script>

	<script type="text/javascript" src="${ctx }/static/js/layer/layer.js"></script>
	<script src="${ctx }/static/script/comm/base.js"></script>
	<script type="text/javascript" src="${ctx }/static/js/My97DatePicker/WdatePicker.js"></script>
	<!-- 菜单选中样式 -->
	<script type="text/javascript">
		var fontWebHost = "211.142.203.243";
		$('#scroll').click(function() {
			$("html,body").animate({
				scrollTop : 0
			}, 200);
		});
		$(function () {
			// 一级菜单点击加样式
			$('.page-sidebar-menu li').click(function() {
				$('.page-sidebar-menu li').each(function(i, n) {
					if(i > 1) {
						$(this).removeClass(); 
					}
				});
				this.className = 'active';
			});		
			// 二级菜单点击加样式
			$('.sub-menu li a').click(function() {
				$('.sub-menu li a').each(function() {
					$(this).removeClass(); 
				});
				
				this.className = 'current';
			});		
		});
			
		function initContentDiv(menuId,event,menuUrl) {
		    
		    if(menuUrl ==null || menuUrl ==""){
		        return false;
		    }else{
			    event.stopPropagation();
	            $.ajax({
	                url: '${ctx }/menu/initContentNav',
	                data: { menuId: menuId },
	                dataType: 'html',
	                success: function (data) {
	                    
	                    $(".page-content").html(data);
	                }
	            });
		    }
        }

        function initMain(url)
        {
            $.ajax({
                url: url,
                data:'',
                dataType: 'html',
                success: function (data) {
                    $(".page-content").html(data);
                }
            });
        }
        
        //退出操作
        function loginOut(){
           $.ajax({
                url: '${ctx }/user/Logout',
                data:'get',
                dataType: 'html',
                success: function (data) {
                    window.location.href='${ctx}';
                }
            });
        }
        
        
	</script>
</body>
<!-- END BODY -->
</html>

